import request from '@/utils/request';

/**
 * 我的面试-我发起的面试
 * @method Post
 */
export async function querymyinterviews(params) {
    return request('/api/oa/v1/interview/querymyinterviews', {
        method: 'POST',
        data: params
    });
}
/**
 * 我的面试-我进行的面试
 * @method Post
 */
export async function queryleaderinterviews(params) {
    return request('/api/oa/v1/interview/queryleaderinterviews', {
        method: 'POST',
        data: params
    });
}

/**
 * 面试管理-管理员-面试记录列表
 * @method Post
 */

export async function queryallinterviews(params) {
    return request('/api/oa/v1/interview/queryallinterviews', {
        method: 'POST',
        data: params
    });
}

/**
 * 面试管理-发起面试-输入名称模糊搜索候选人
 * @method get
 */

export async function searchCandidate(params) {
    return request('/api/oa/v1/candidate/searchCandidate', {
        method: 'POST',
        data: params
    });
}

/**
 * 面试管理-通过候选人arrangeCode获取应聘者信息
 * @method get
 */

export async function getinterviewrecruitinfo(params) {
    return request(`/api/oa/v1/interview/getinterviewrecruitinfo/${params.arrangeCode}`, {
        method: 'GET'
    });
}

/**
 * 面试管理-通过候选人arrangeCode获取面试安排
 * @method get
 */

export async function getinterviewinfo(params) {
    return request(`/api/oa/v1/interview/getinterviewinfo/${params.arrangeCode}`, {
        method: 'GET'
    });
}

/**
 * 面试管理-通过候选人arrangeCode获取应聘者信息
 * @method Post
 */

export async function getemployeebyrole(params) {
    return request('/api/oa/v1/employee/getemployeebyrole', {
        method: 'POST',
        data: params
    });
}

/**
 * 面试管理-发起面试-保存数据
 * @method Post
 */

export async function savefistinterview(params) {
    return request('/api/oa/v1/interview/savefistinterview', {
        method: 'POST',
        data: params
    });
}

/**
 * 面试管理-修改面试安排
 * @method Post
 */

export async function updateinterviewarrange(params) {
    return request('/api/oa/v1/interview/updateinterviewarrange', {
        method: 'POST',
        data: params
    });
}
/**
 * 面试管理-保存面试结果
 * @method Post
 */

export async function saveinterviewrecord(params) {
    return request('/api/oa/v1/interview/saveinterviewrecord', {
        method: 'POST',
        data: params
    });
}

/**
 * 我的招聘-候选人详情-筛选面试记录
 * @method GET

 */
export async function fetchInterviewRecord(params) {
    return request(`/api/oa/v1/interview/getinterviewrecordsinfo/${params.candidateCode}`, {
        method: 'GET'
    });
}

/**
 * 我的面试-发起offer申请
 * @method GET
 */
export async function featchApply(params) {
    return request(`/api/oa/v1/offer/apply/${params.companyId}`, {
        method: 'GET'
    });
}

/**
 * 我的面试-获取面试评分表
 * @method GET
 */
export async function getinterviewimage(params) {
    return request(`/api/oa/v1/interview/getinterviewimage/${params.postType}`, {
        method: 'GET'
    });
}
/**
 * 取消面试
 * @method post
 */
export async function cancelInterview(params) {
    return request('/api/oa/v1/interview/cancelinterview', {
        method: 'POST',
        data: params
    });
}

// 字典
export const dictionary = async params =>
    request('/api/uc/org/v1/orgLinkList', {
        method: 'POST',
        data: params
    });
